package DomainLayer;

public class Supplier
{
    private String name;
    private String address;
    private Product product;
    
    /**
     * @param name a supplier's name.
     * @param address the supplier's address.
     * @param product a product the supplier is selling for this company.
     */
    public Supplier(String name, String address, Product product)
    {
        this.name = name;
        this.address = address;
        this.product = product;
    }
    
    public void setName(String name){
        this.name = name;
    }
    
    public void setAddress(String address){
        this.address = address;
    }
    
    public void setProdcut(Product product){
        this.product = product;
    }
    
    public String getName(){
        return name;
    }
    
    public String getAddress(){
        return address;
    }
    public Product getProduct(){
        return product;
    }
    
    //@return string an iformation about the supplier.
    public String toString(){
        return "########## SUPPLIER'S INFORMATION ##########"+'\n'+
               "Supplier's name: "+getName()+'\n'+
               "Supplier's address: "+getAddress()+'\n'+
               "Product: "+getProduct().getTitle()+'\n'+
               "Product price: "+getProduct().getPrice()+'\n';
               
    }
}
